package cn.stylefeng.guns.modular.business.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 用户等级表
 * </p>
 *
 * @author jwj
 * @since 2019-07-18
 */
@TableName("c_user_grade")
@Data
public class UserGrade implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "grade_id", type = IdType.AUTO)
    private Integer gradeId;

    /**
     * 等级级别
     */
    @TableField("level")
    private Integer level;

    /**
     * 等级名称
     */
    @TableField("grade_name")
    private String gradeName;

    /**
     * 下单上级返现折扣
     */
    @TableField("pay_rate_1")
    private BigDecimal payRate1;

    /**
     * 下单第2级上级返现
     */
    @TableField("pay_rate_2")
    private BigDecimal payRate2;

    /**
     * 下单第3级上级返现
     */
    @TableField("pay_rate_3")
    private BigDecimal payRate3;

    /**
     * 下单返现最大级别
     */
    @TableField("pay_rate_max")
    private Integer payRateMax;

    /**
     * 升级上级返现
     */
    @TableField("up_rate_1")
    private BigDecimal upRate1;

    /**
     * 升级第二级上级返现
     */
    @TableField("up_rate_2")
    private BigDecimal upRate2;

    /**
     * 升级第三级上级返现
     */
    @TableField("up_rate_3")
    private BigDecimal upRate3;

    /**
     * 升级分润最大级别
     */
    @TableField("up_rate_max")
    private Integer upRateMax;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private Date updateTime;

    /**
     * 是否删除
     */
    @TableField("delete_flag")
    private Integer deleteFlag;

    /**
     * 级别图标
     */
    @TableField("icon")
    private String icon;

    /**
     * 升级所需分数
     */
    @TableField("up_score")
    private Integer upScore;

    /**
     * 额外的折扣
     */
    @TableField("add_rate")
    private BigDecimal addRate;

    /**
     * 升级费用
     */
    @TableField("fee")
    private BigDecimal fee;

    /**
     * 递减折扣
     */
    @TableField("decr_rate")
    private BigDecimal decrRate;



    @Override
    public String toString() {
        return "UserGrade{" +
        "gradeId=" + gradeId +
        ", payRate1=" + payRate1 +
        ", payRate2=" + payRate2 +
        ", payRate3=" + payRate3 +
        ", payRateMax=" + payRateMax +
        ", upRate1=" + upRate1 +
        ", upRate2=" + upRate2 +
        ", upRate3=" + upRate3 +
        ", upRateMax=" + upRateMax +
        ", createTime=" + createTime +
        ", updateTime=" + updateTime +
        ", deleteFlag=" + deleteFlag +
        ", icon=" + icon +
        ", upScore=" + upScore +
        ", addRate=" + addRate +
        "}";
    }
}
